package servlets;


import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import beans.Correo;

/**
 * Servlet implementation class EnviarCorreos
 */
@WebServlet("/EnviarCorreos")
public class EnviarCorreos extends HttpServlet {
	private static final long serialVersionUID = 1L;

	/**
	 * @see HttpServlet#HttpServlet()
	 */

	public void doGet(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		Correo mail=new Correo();
		try{
		mail.enviarMail("rogger.123.2@gmail.com");
		}catch (Exception e) {
			// TODO: handle exception
		}
	}
	
	public void doPost(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		
		try{
		Correo mail=new Correo();
		
		mail.enviarMail("rogger.123.2@gmail.com");
		}catch (Exception e) {
			// TODO: handle exception
		}
	}

		
}
